/*
 * Copyright (c) 2023 Huawei Technologies Co., Ltd.
 * openUBMC is licensed under Mulan PSL v2.
 * You can use this software according to the terms and conditions of the Mulan PSL v2.
 * You may obtain a copy of Mulan PSL v2 at:
 *         http://license.coscl.org.cn/MulanPSL2
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PSL v2 for more details.
 */
#include <cstdint>
#include <string_view>
#include <vector>
#ifndef __HASDEF_H__

// 错误码定义
#define HAS_OK  0
#define HAS_ERR -1

#define __HASDEF_H__

typedef struct tag_data {
    uint8_t              addr_width;
    uint8_t              offset_width;
    uint32_t             mask;
    uint32_t             addr;
    uint32_t             offset;
    uint32_t             length;
    std::vector<uint8_t> in_buffer;
    std::vector<uint8_t> out_buffer;
    uint32_t             read_time_out;
    uint32_t             write_time_out;
    uint8_t              optype;
} ACCESS_DATA_S;

#endif